//
//  VCHttpTool.h
//  VCShop
//
//  Created by VoyageCN on 16/8/19.
//  Copyright © 2016年 VoyageCN. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef void(^requestSuccessBlock)(id responseObject);
typedef void(^requestErrorBlock)(NSError *error);

@interface VCHttpTool : AFHTTPSessionManager

@property (nonatomic, copy) requestSuccessBlock successBlock;
@property (nonatomic, copy) requestErrorBlock errorBlock;

+ (void)GETRequestWithURL:(NSString *)url
          params:(NSDictionary *)params
        success:(requestSuccessBlock)returnSuccess
          error:(requestErrorBlock)returnError;

+ (void)POSTRequestWithURL:(NSString *)url
          params:(NSDictionary *)params
        success:(requestSuccessBlock)returnSuccess
          error:(requestErrorBlock)returnError;

@end
